﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace SPA_alternative.Data
{
    public class Product
    {
        [Key]
        [Column(TypeName = "int identity")]
        public int ID { get; set; }

        [Required]
        [StringLength(50, MinimumLength=5)]
        public string Category { get; set; }

        [Required]
        [StringLength(50, MinimumLength = 5)]
        public string Name { get; set; }

        [Required]
        [DataType(DataType.Currency)]
        public decimal Price { get; set; }

        [Required]
        public int Quantity { get; set; }
    }
}